﻿#include <iostream>
using namespace std;
#include "TcpServer.h"

int main(int argc, char* argv[]) {
#if 0
    if (argc != 3) {
        printf("./xx.out port path\n");
        exit(0);
    }
    unsigned short port = atoi(argv[1]); // 获取端口号
    chdir(argv[2]); // 将服务器的工作路径切换为path
#else
    unsigned short port = 8888;
    chdir("work");
#endif
    TcpServer* server = new TcpServer(port, 4);
    server->run();
}